package com.thd.springboottest.ioc.profile;


import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

/**
 * 当 yml中spring.profiles.active的值是dev或者test的时候才会注册该bean
 */
@Component
@Profile(value={"dev","test"})
public class RegistBeanByAnnotationProfile {
    public void say(){
        System.out.println("RegistBeanByAnnotationProfile.say()");
        System.out.println(" dev or test");
    }
}
